<style>
    #flowPicture .panel-body {
        padding: 0px;
    }

    .sp_result_area {
        z-index: 110
    }

    ul {
        list-style: none;
        margin-top: 20px;
    }
</style>
<style>
    .form-layer {
        height: 100%;
        min-height: 150px;
        min-width: 300px;
    }

    .form-body {
        width: 100%;
        overflow: auto;
        top: 0;
        position: absolute;
        z-index: 10;
        bottom: 50px;
        padding: 15px;
    }

    .form-layer .form-footer {
        height: 50px;
        line-height: 50px;
        background-color: #ecf0f1;
        width: 100%;
        position: absolute;
        z-index: 200;
        bottom: 0;
        margin: 0;
    }

    .form-footer .form-group {
        margin-left: 0;
        margin-right: 0;
    }
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type='hidden' id="flowJson" name="row[flowcontent]" value='{$row.flowcontent}'>
    <div class="row">
        <div class="col-md-12" id="flowPicture">
            <div class="panel panel-default panel-intro">
                <div class="panel-body">
                    <div class='flowchart-panel'>
                        <div class="row">
                            <div class="col-sm-2 col-xs-12">
                                <ul class='nodes'>
                                </ul>
                            </div>
                            <div class="col-sm-10 col-xs-12" style="height: 550px" id="middle">
                                <div id="demo-chart">
                                    <!-- <div class="startpoint point window node" style="left: 150px; top:20px; background-color:green" data-nodetype="startpoint" id="startpoint">Start</div>
                                    <div class="endpoint point window node" style="left: 150px; top:350px" data-nodetype="endpoint" id="endpoint">End</div> -->
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-12">
            <button type="submit" id="ok" class="btn btn-success btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script type="text/html" id="nodetpl">
    <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
        <div class="row">
            <div class="col-sm-6">
                <div class="panel panel-default panel-intro">
                    <div class="panel-body">
                        <div class="tab-content">
                            <div class="tab-pane fade active in">
                                <div class="form-group">
                                    <label for="activeNodeName" class="control-label col-xs-12 col-sm-3">节点名称</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" id="activeNodeName" class="form-control" value="<%=activeNode.name%>"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="confluence" class="control-label col-xs-12 col-sm-3">通过策略</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <select class="form-control" id="confluence">
                                            <option value="all"
                                            <%=activeNode.setInfo.confluence=='all'?'selected':''%>>全部</option>
                                            <option value="any"
                                            <%=activeNode.setInfo.confluence=='any'?'selected':''%>>任一</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="selectType" class="control-label col-xs-12 col-sm-3">审批类型</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <select class="form-control" id="selectType">
                                            <option value="user"
                                            <%=activeNode.setInfo.nodeDesignate=='user'?'selected':''%>>用户</option>
                                            <option value="role"
                                            <%=activeNode.setInfo.nodeDesignate=='role'?'selected':''%>>角色</option>
                                            <option value="dept"
                                            <%=activeNode.setInfo.nodeDesignate=='dept'?'selected':''%>>上级领导</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group" id="userGroup">
                                    <label for="txtUser" class="control-label col-xs-12 col-sm-3">审批人</label>
                                    <div class="col-xs-12 col-sm-8" style="zIndex:999">
                                        <div class="input-group input-groupp-md">
                                            <input type="text" id="txtUser" data-page-size='10' class="form-control selectpage" style="width:200px;" data-multiple="true" data-source="flow/scheme/selectuserpage" data-field="username" name="row[name]" value="<%=activeNode.setInfo.NodeDesignateData.users.join(',')%>"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group" id="roleGroup">
                                    <label for="txtRole" class="control-label col-xs-12 col-sm-3">审批角色</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="input-group input-groupp-md">
                                            <input type="text" id="txtRole" class="form-control selectpage" data-page-size='10' data-source="flow/scheme/selectrolepage" data-field="name" name="row[name]" value="<%=activeNode.setInfo.NodeDesignateData.role.join(',')%>"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                                    width="100%">
                            </table>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-4">
            </div>
            
            <div class="col-sm-4">
            </div>
        </div>
    </form> 
</script>


<script type="text/html" id="nodetplStart">
    <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
        <div class="row">
            <div class="col-sm-6">
                <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                                    width="100%">
                            </table>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-4">
            </div>
            
            <div class="col-sm-4">
            </div>
        </div>
    </form> 
</script>

